open(BUFF,"tem.txt");
$sum = 0;
while(<BUFF>)
{
	chomp($_);
	@a = split(/\t/,$_);
	$sum = $sum +$a[1];
}
#print "sum $sum\n";
open(BUFF,"tem.txt");
$k = 0;
$sum1 = 0;
$totalpercent = 0;
while(<BUFF>)
{
        chomp($_);
        @a = split(/\t/,$_);
	$sum1 =$sum1+$a[1];
	if($k == 9)
	{
		$percent = ($sum1/$sum)*100;
		#print $a[0]."\t".$sum1."\t".$percent."\n";
		print $a[0]."\t".$percent."\n";
		$totalpercent = $totalpercent+$percent;
		$k = 0;
		$sum1 = 0;
	}
	else
	{
		$k++;
	}
}	
$percent = ($sum1/$sum)*100;
print $a[0]."\t".$percent."\n";	
#print "totalpercent $totalpercent\n";
